package com.oa.controller;

import java.util.HashMap;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.oa.service.LogService;

@Controller
public class LogCollection {
	
	@Autowired
	LogService logService;
	
	@RequestMapping("getLog")
	@ResponseBody
	public Map<String,Object> getLog(Integer currentPage,String userName,String uname,String type){
		Map<String,Object> map = new HashMap<>();
		map.put("currentPage", currentPage);
		map.put("userName", userName);
		map.put("uname", uname);
		map.put("type", type);
		System.out.println(map);
		Map<String,Object> result = logService.getLogList(map);
		return result;
	}
	@RequestMapping("moveLogs")
	@ResponseBody
	public String moveLogs(String str){
		String result = logService.deleletLogs(str);
		return result;
	}

}
